package com.aspose.cells;

class zakb {
   private zoz a = null;
   private static final com.aspose.cells.b.c.a.za b = new com.aspose.cells.b.c.a.za(new String[]{"xmlns", "SelectionNamespaces"});

   zakb(zoz var1) {
      this.a = var1;
   }

   void a(zcfw var1) throws Exception {
      this.c(var1);
      if (!var1.n()) {
         if (var1.m()) {
            while(var1.l()) {
               switch(b.a(var1.p())) {
               case 0:
                  this.a.a.getWorksheets().getXmlMaps().d = var1.s();
                  break;
               case 1:
                  this.a.a.getWorksheets().getXmlMaps().c = var1.s();
               }
            }
         }

         var1.d();

         try {
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else if ("Schema".equals(var1.p())) {
                  com.aspose.cells.b.a.a.ze.a(this.a.a.getWorksheets().getXmlMaps().b, (Object)var1.u());
               } else if ("Map".equals(var1.p())) {
                  this.b(var1);
               } else {
                  var1.a();
               }
            }
         } catch (Exception var3) {
            ;
         }

      }
   }

   void b(zcfw var1) throws Exception {
      XmlMap var2 = new XmlMap();
      this.a.a.getWorksheets().getXmlMaps().a(var2);
      if (var1.m()) {
         while(var1.l()) {
            if ("ID".equals(var1.p())) {
               var2.c = zase.C(var1.s());
            } else if ("Name".equals(var1.p())) {
               var2.setName(var1.s());
            } else if ("RootElement".equals(var1.p())) {
               var2.g = var1.s();
            } else if ("SchemaID".equals(var1.p())) {
               var2.h = var1.s();
            } else if ("ShowImportExportValidationErrors".equals(var1.p())) {
               var2.i = zase.ax(var1.s());
            } else if ("AutoFit".equals(var1.p())) {
               var2.b = zase.ax(var1.s());
            } else if ("Append".equals(var1.p())) {
               var2.a = zase.ax(var1.s());
            } else if ("PreserveSortAFLayout".equals(var1.p())) {
               var2.f = zase.ax(var1.s());
            } else if ("PreserveFormat".equals(var1.p())) {
               var2.e = zase.ax(var1.s());
            }
         }

         var1.k();
         if (var1.n()) {
            var1.a();
         } else {
            var1.d();

            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else if ("DataBinding".equals(var1.p())) {
                  zcfj var3 = new zcfj();
                  var2.j = var3;
                  this.a(var1, var3);
                  var1.a();
               } else {
                  var1.a();
               }
            }

            var1.h();
         }
      }
   }

   private void a(zcfw var1, zcfj var2) {
      if (var1.m()) {
         while(var1.l()) {
            if ("FileBinding".equals(var1.p())) {
               var2.c = zase.ax(var1.s());
            } else if ("FileBindingName".equals(var1.p())) {
               var2.d = var1.s();
            } else if ("ConnectionID".equals(var1.p())) {
               var2.a = zase.C(var1.s());
            } else if ("DataBindingLoadMode".equals(var1.p())) {
               var2.a = zase.C(var1.s());
            } else if ("DataBindingName".equals(var1.p())) {
               var2.a(var1.s());
            } else {
               var2.e = zase.aQ(var1.s());
            }
         }

         var1.k();
      }
   }

   private void c(zcfw var1) throws Exception {
      var1.j();
      if (var1.r() != 1 || !"MapInfo".equals(var1.p())) {
         throw new CellsException(6, "Xml map root element eror");
      }
   }
}
